home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
asmutil
/
a86v400.zip
/
A14.DOC
< prev
next >
Wrap
Text File
|
1994-12-21
|
33KB
|
735 lines
CHAPTER 14 DESCRIPTIONS OF A86 ERROR MESSAGES
A86 signals successful assembly by returning an ERRORLEVEL of 0.
If errors are detected during assembly, A86 returns an ERRORLEVEL
of 1. If undefined symbols remain at the end of assembly, A86
returns an ERRORLEVEL of 2.
ERROR 01: Unknown Mnemonic
Most assembly-language lines start with a built-in instruction
mnemonic such as MOV or ADD. The only circumstances in which
a line can start with a non-built-in symbol are if the symbol
is a macro name or INT equate, or if the symbol is now being
defined, as indicated by a limited set of following symbols: a
colon, EQU, DB, DW, etc. This line started with a
non-built-in symbol which did not fall into any of the above
categories. You might have misspelled an instruction
mnemonic, or misspelled the following word.
ERROR 02: Jump > 128
The destination operand of a conditional jump must be a label
within 128 bytes of the end of the instruction. (Precisely,
from -128 to +127 from the next instruction, which is from
-126 to +129 from the start of the conditional jump.) This
error can also occur from an unconditional JMP to a
forward-referenced local label, since A86 assumes the short
JMP form in that case. This error is reported in three
possible places:
1. At the jump. The operand is more than 126 bytes before
the jump, or the operand is not a label (e.g. you tried an
indirect conditional jump through a variable, which isn't
allowed)
2. At a label definition. In this case, you use your editor
to search backwards for references to the label. One or
more of the earliest conditional jumps found are too far
away.
3. At a RET, RETF, or IRET instruction. You use your editor
to search backwards for that flavor of RET used as the
operand to a conditional jump (the A86 conditional return
feature). The earliest such jumps not satisfied by a
previous RET are too far away.
You usually correct this error by rearranging your code, or
(better) by breaking intervening code off into subroutines. If
desperate, you can replace "Jcond" with "IF cond JMP".
ERROR 03: [BX+BP] And [SI+DI] Not Allowed
The 86 instruction set does not support the combinations of
indexing registers indicated in the error message. In
previous versions of A86, this error was reported in other
illegal operand combinations; I've attempted to change other
cases to error 14. If you ever find otherwise, please let me
know.
14-2
ERROR 04: Bad Character In Number
All numbers, and only numbers, start with a decimal digit.
(It's illegal to have a symbol begin with a digit; e.g.
01MYVAR .) You have coded something that starts with a
decimal digit but does not have the correct format for a
numeric constant. See Chapter 8 for detailed descriptions of
the formats of both integer and floating constants.
ERROR 05: Operands Not Allowed
When this error is reported it usually means that you have
provided something more than just the mnemonic for an
instruction that does not have any operands: e.g., PUSHF,
STOSB, STC, FLDPI, CLTS. It's also called in other contexts
when the assembler expects nothing more on the line; e.g.,
NAME with more than just a single name following, or something
following the word ENDS.
ERROR 06: Symbol Required
This is reported in numerous situations where A86 requires
some sort of symbol: either a built-in assembler mnemonic, or
a symbol you define. (It's possible that a number or some
punctuation marks are legal in the context, and that they have
already been checked for.) Instead of a symbol, a punctuation
mark or out-of-context number was seen. The contexts in which
this error can occur include:
* the start of a line (characters hex 3C or greater)
* after the following at the start of a line: a symbol you
define, #, #IF, IF, CODE, or DATA
* where operands to the following directives are expected:
NAME, PUBLIC, EXTRN, GROUP, SEGMENT
* after ">" denoting a local-label forward reference
ERROR 07: Local Symbol Required
This is reported when something other than a generic local
label (letter followed by one or more digits) follows a ">"
mark, which denotes a local-label forward reference. If you
meant "greater than" you use the GT operator instead.
ERROR 08: Too Many Operands
This is reported for instructions and directives requiring a
limited number of operands, for which the limit is exceeded.
Since operands are separated by commas, you have too many
commas-- possibly an extra comma between the mnemonic and
first operand, or at the end of the operands.
ERROR 09: Constant Required
14-3
This is reported for instructions and directives (ENTER, RET,
RADIX, etc.) requiring operands that are an immediate constant
number; and for expression operators (*, /, SHL, OR, NOT, BY,
etc.) whose operands must be constant. In some cases a
limited number of forms other than constants are acceptable,
but the assembler has already checked for and not found those
possibilities.
ERROR 10: More Operands Required
This is reported for instructions requiring two operands, for
which you have provided no operands or only one operand. You
might have left out the comma separating the operands.
ERROR 11: Constant/Label Not Allowed
This is reported when you have given a constant number in a
place where it isn't allowed-- usually as a destination
operand to an instruction, such as the first operand to a MOV
or ADD. If you meant the operand to be the memory location
with the constant offset, you must convert the type by
enclosing the operand in brackets [ ] or appending a
size-specifier (B, W, D, Q, or T) to the number.
ERROR 12: Segment Register Not Allowed
This is reported when you have used a segment register in an
instruction where it isn't allowed. The only instructions
allowing segment registers as operands are MOV, PUSH, and POP.
You can't, for example, ADD into a segment register. If you
want to do anything with a segment register value, you have to
MOV it into a general register, perform the operation, then
MOV the result back to the segment register.
ERROR 13: Byte/Word Combination Not Allowed
This is reported in a two-byte instruction in which one
operand is byte-sized and the other word-sized; or in an
instruction with a byte-sized destination and an immediate
source whose value is not byte-sized (high byte not 0 or 0FF).
If one of the operands is a memory variable of the wrong size,
you either change the declaration of the variable (DB to DW or
vice versa) or override the size of the variable in this
instruction only, by appending a " B" or " W" to the memory
operand.
ERROR 14: Bad Operand Combination
This is reported when you attempt to add or combine terms in
an operand expression that do not allow combination. An
example of this would be DT 3.7+BX. Only constants can be
added to floating point numbers.
This is also reported when you have two operands that are
mismatched in size, and the mismatch is something other than
Byte vs. Word. Example: MOV AL,D[0100].
14-4
ERROR 15: Bad Subtraction Operands
This is reported when you attempt to subtract terms in an
operand expression that do not allow subtraction, or if the
right-hand side to a subtraction is missing. If the
right-hand side to a subtraction is a non-forward-referenced
constant, then the left side can be almost anything.
Otherwise, the operands must match; e.g., labels from
relocatable segments must be in the sam